home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / SDKs / ScreenLight™ 1.0.1 / CodeExamples / More Code / Jules.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-01  |  1.1 KB  |  54 lines  |  [TEXT/MMCC]

  1. #ifndef __QUICKDRAW__
  2. #include <Quickdraw.h>
  3. #endif
  4.  
  5. #if defined(powerc) || defined (__powerc)
  6.     #define kNumJuliaPts 1200
  7. #else
  8.     #define kNumJuliaPts 200
  9. #endif
  10.  
  11. typedef struct
  12. {
  13.     long            numJuliaPts;
  14.  
  15.     // used to divide random numbers to get small fractional double_ts
  16.     double_t        randDivider;         
  17.     
  18.     // the # of pixels per unit of Julia space
  19.     double_t        xPixPerUnit;
  20.     double_t        yPixPerUnit;
  21.     
  22.     // globals for walking about on the M set
  23.     double_t         deltaX;
  24.     double_t        deltaY;
  25.     double_t        boundsLeft;
  26.     double_t        boundsRight;
  27.     double_t        boundsTop;
  28.     double_t        boundsBot;
  29.     double_t        currentX;
  30.     double_t        currentY;
  31.     
  32.     // Colors and color increments for drawing and ramping
  33.     RGBColor    drawColor;
  34.     long        curHue;
  35.     Boolean        useColor;
  36.     //short        rInc, gInc, bInc;
  37.     
  38.     // half of the window dimensions
  39.     long        halfXDim;
  40.     long        halfYDim;            
  41.  
  42.     long        ptIndex;
  43.     Point        juliaPts[ kNumJuliaPts];
  44.     
  45.     long        pad[40];    // HACK: sizeof() is having a problem 05jul94 bh
  46.     
  47. } JulesData, *JulesDataPtr;
  48.     
  49. // Prototypes
  50. void SmoothWalk(WindowPtr wind);
  51. void InitJules(JulesDataPtr julePtr, Rect *monR);
  52. void JuliaStep(JulesDataPtr julePtr, short numPts, Boolean drawIt);
  53. void GetNextPoint(JulesDataPtr julePtr);
  54.